CentOS7 关于启动Apache(httpd)服务

您所在的位置:网站首页 启动服务命令 service CentOS7 关于启动Apache(httpd)服务

CentOS7 关于启动Apache(httpd)服务

2023-12-01 22:19| 来源: 网络整理| 查看: 265

想要启动apache(httpd)服务,执行以下命令都不行↓

service httpd start (sentos7之前版本的命令) systemctl start httpd命令(sentos7之后版本的命令) /etc/init.d/httpd start

出现以下结果,如图: 在这里插入图片描述 在这里插入图片描述 1.使用命令yum install httpd httpd-devel 安装完apache

yum install httpd httpd-devel

在这里插入图片描述 2. 然后等待,会出现需要确认下载项 y/d/n 输入y,Enter即可 在这里插入图片描述 3.等待安装完成之后,可使用命令启动apache 在这里插入图片描述 4.可通过命令 service httpd status查看apache运行状态

service httpd status(cemtos6) systemctl status httpd(centos7)

在这里插入图片描述 5.也可以在虚拟机的浏览器中查看apache的页面,如果装成功了能访问到的页面如图,用120.0.1或者是通过ip访问 在这里插入图片描述 6.查看ip的命令是ifconfig ifconfig在这里插入图片描述 在这里插入图片描述 扩展:

systemctl start httpd.service #启动 systemctl stop httpd.service #停止 systemctl restart httpd.service #重启 systemctl enable httpd.service #开机自启 systemctl disable httpd.service #开机不启动


【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3